/**
 * [PC 登陆页JS]
 *
 * Created by wdb on 5/15/15.
 */
define([
    "jquery",
    "bootstrap",
    "bootbox",
    "jqBootstrapValidation",
    "IO"
], function($,bootstrap,bootbox,jqBootstrapValidation,IO) {
    $(function() {
        $("input").jqBootstrapValidation({
            preventSubmit: true,
            submitError: function($form, event, errors) {
            },
            submitSuccess: function($form, event) {
                event.preventDefault();
                var login = {};
                login.login_name = $("#login_name").val();
                login.password = $("#password").val();
                if(login.login_name==""||login.password==""){
                    bootbox.alert("用户名密码不能为空");
                    return;
                }
                //加载处理
                $('body').css("overflow","hidden");
                $("#cover").show();
                //提交完成
                location.href = '/courseManagement';
            }
        });

    });
});